package com.ruicar.afs.cloud.apply.pre.loan.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruicar.afs.cloud.apply.common.entity.ApplyChannelInfo;
import com.ruicar.afs.cloud.apply.pre.loan.condition.ApplyReportCondition;
import com.ruicar.afs.cloud.apply.pre.loan.condition.CarDealerCondition;
import com.ruicar.afs.cloud.common.core.util.IResponse;

import java.util.List;

/**
 * @description: 申请渠道信息
 * @author: sijun.yu
 * @date: 2020/6/23 0:02
 */
public interface ApplyChannelInfoService extends IService<ApplyChannelInfo> {

    /**
     * 查询车商列表
     *
     * @return
     */
    public IResponse getCarDealList(CarDealerCondition condition);

    /**
     * 查询挂靠公司列表
     *
     * @param condition
     * @return
     */
    public IResponse getAffiliatedUnitsList(CarDealerCondition condition);

    /**
     * 查询网约车平台列表
     *
     * @param condition
     * @return
     */
    public IResponse getCooperPlatList(CarDealerCondition condition);

    /**
     * 通过申请编号获取渠道信息
     *
     * @param applyNo
     * @return
     */
    public ApplyChannelInfo getChannelInfoByApplyNo(String applyNo);

    /**
     * 获取渠道车辆类型
     * @param condition
     * @return
     */
    public List<String> queryCarType(ApplyReportCondition condition);

    /**
     * 保存渠道信息
     *
     * @param applyNo
     * @return
     */
    public ApplyChannelInfo saveChannelInfo(String applyNo, ApplyReportCondition condition);

    /**
     * 更新渠道信息
     *
     * @param channelInfo
     * @param condition
     * @return
     */
    public void updateChannelInfo(ApplyChannelInfo channelInfo, ApplyReportCondition condition);

    /**
     * 通过渠道ID获取渠道信息
     *
     * @param channelId
     * @return
     */
    public JSONObject getChannelDetailInfo(String channelId);

    /**
     * 通过渠道id返回渠道和车商列表
     * @param channelId
     * @return
     */
    public IResponse getCarDealerByChannelId(String channelId);

}
